#include "GeneBedFileReader.h"
#include <algorithm>


GeneFileReader::GeneFileReader(char* str): filename(str){
	ifstream infile(filename, ios::in);

	// read infile and instantiate GeneField with each line then push it into the mapvec vector
	while (!infile.eof()){
		string temp;
		getline(infile, temp);
		if (temp.compare("") != 0){
			genevec.push_back(new GeneField(temp));
		}
	}
	// sort the vector based on chr and pos
	
	sort(genevec.begin(),genevec.end(),genevec_comp());

}




	


